package com.lihui.model;

import java.util.Comparator;
import java.util.stream.Collector;

/**
 * 功能描述
 *实现比较器比较
 * @author wileda
 * @date 2022/11/07  10:32
 */
public class StudentCompareWithAge implements Comparator<Student> {

    @Override
    public int compare(Student o1, Student o2) {
        return o1.getAge() - o2.getAge();
    }
}
